# 为应用生成激活码（或者优惠券）
import random

# 生成16位字符串、并排除重复生成的激活码
def random_str():
  seed = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
  sa = []
  code = ''
  for i in range(16):
    if i % 4  ==0 and  i !=0 :
        code +='-'
    code += random.choice(seed)
  sa.append(code)
  salt = "".join(sa)
  return salt

if __name__ == '__main__':
    all = []
    for i in range(10000):
       code = random_str()
       if code not in all:
        all.append(code)
        # print(code)
    print(len(all))